package com.ruoyi.combat.util;

import java.util.HashMap;
import java.util.Map;

/**
 * app越权代码
 */
public class ApKConstants {
    /**  短信 **/
    public static final String android_permission_READ_SMS = "android.permission.READ_SMS";
    public static final String android_permission_RECEIVE_SMS = "android.permission.RECEIVE_SMS";
    public static final String android_permission_SEND_SMS = "android.permission.SEND_SMS";

    /**  gps **/
    public static final String android_permission_ACCESS_GPS = "android.permission.ACCESS_GPS";
    public static final String android_permission_ACCESS_BACKGROUND_LOCATION = "android.permission.ACCESS_BACKGROUND_LOCATION";

    /**  WiFi热点连接记录 **/
    public static final String android_permission_NEARBY_WIFI_DEVICES = "android.permission.NEARBY_WIFI_DEVICES";
    public static final String android_permission_ACCESS_WIFI_STATE = "android.permission.ACCESS_WIFI_STATE";
    public static final String android_permission_CHANGE_WIFI_STATE = "android.permission.CHANGE_WIFI_STATE";

    /**  通讯录 **/
    public static final String android_permission_WRITE_CONTACTS = "android.permission.WRITE_CONTACTS";
    public static final String android_permission_READ_CONTACTS = "android.permission.READ_CONTACTS";
    public static final String android_permission_READ_CALL_LOG = "android.permission.READ_CALL_LOG";
    public static final String android_permission_WRITE_CALL_LOG = "android.permission.WRITE_CALL_LOG";

    /**  基站 **/
    public static final String android_permission_ACCESS_COARSE_LOCATION = "android.permission.ACCESS_COARSE_LOCATION";
    public static final String android_permission_ACCESS_FINE_LOCATION = "android.permission.ACCESS_FINE_LOCATION";


    /**  设备信息 **/
    public static final String android_permission_READ_PHONE_STATE = "android.permission.READ_PHONE_STATE";

    public static Map<String,String> map = new HashMap<>();

    static {
        map.put("android.permission.READ_SMS","短信");
        map.put("android.permission.RECEIVE_SMS","短信");
        map.put("android.permission.SEND_SMS","短信");
        map.put("android.permission.ACCESS_GPS","GPS");
        map.put("android.permission.ACCESS_BACKGROUND_LOCATION","GPS");
        map.put("android.permission.NEARBY_WIFI_DEVICES","Wi-Fi连接热点记录");
        map.put("android.permission.ACCESS_WIFI_STATE","Wi-Fi连接热点记录");
        map.put("android.permission.CHANGE_WIFI_STATE","Wi-Fi连接热点记录");
        map.put("android.permission.WRITE_CONTACTS","通讯录");
        map.put("android.permission.READ_CONTACTS","通讯录");
        map.put("android.permission.READ_CALL_LOG","通讯录");
        map.put("android.permission.WRITE_CALL_LOG","通讯录");
        map.put("android.permission.ACCESS_COARSE_LOCATION","基站");
        map.put("android.permission.ACCESS_FINE_LOCATION","基站");
        map.put("android.permission.READ_PHONE_STATE","设备信息");
    }

    public static String getPermissionName(String permission){
        return map.get(permission);
    }




}
